package service.impl;

import dao.Roleline_lxDao;
import entity.Roleline_lx;
import org.springframework.stereotype.Service;
import service.Roleline_lxService;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("roleline_lxService")
public class Roleline_lxServiceimpl implements Roleline_lxService {
    @Resource(name = "roleline_lxDao")
    private Roleline_lxDao roleline_lxDao;
    public List<Roleline_lx> query(String xlid,int runningstate,int pageSize, int pageNumber){
        Map<String,Object> map = new HashMap<String,Object>() ;
        map.put("xlid",xlid);
        map.put("runningstate",runningstate);
        map.put("offset",(pageNumber-1)*pageSize) ;
        map.put("limit",pageSize) ;
        return roleline_lxDao.query(map);
    }

    @Override
    public void add(Roleline_lx roleline_lx) {
        roleline_lxDao.add(roleline_lx);
    }

    @Override
    public int upd(Roleline_lx roleline_lx) {
        return roleline_lxDao.upd(roleline_lx);
    }

    @Override
    public int del(int id) {
        return roleline_lxDao.del(id);
    }

    @Override
    public Roleline_lx one(int id) {

        return roleline_lxDao.one(id);
    }

/*    @Override
    public List<Roleline_lx> list() {
        return roleline_lxDao.list();
    }*/


}
